﻿<!DOCTYPE html>
<!--作业许可证管理=>作业许可证申请=>受影响相关方添加页 -->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>


</head>
<body>


    
<div id="app" v-cloak>   

        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px" size="mini">

            <div style="width:100%;text-align:center ">
                <label style="font-weight:bold">吊装作业人</label>
            </div>
            <el-row>

                <el-col :sqpn="13">
                       <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    <div> {{GeneralLiftingWorkSafety.LiftingUnit+mark.m}}</div>
                                </template>
                                <el-select @visible-change="visibleChange" v-model="Form.LiftingUnit" slot="suffix" :placeholder="Form.HoistingUnit">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in unitDepartment" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>

            <el-row>
                <el-col :sqpn="13">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    <div> {{GeneralLiftingWorkSafety.LiftingConfirmor+mark.m}}</div>
                                </template>
                                <el-select @visible-change="visibleChange" v-model="Form.LiftingConfirmor" slot="suffix" :placeholder="Form.HoistingConfirmor">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in PeopleList" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row type="flex" justify="center">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm">{{col.btnConfirm}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                //父业传参 
                id: '',
                //业务表单内容
                Form: {
                    LiftingUnit: '',
                    LiftingConfirmor: '',
                },
                unitDepartment: [],
                PeopleList: [],
                //表单验证
                rules: {
                    unit: [
                        verification.NotNull                   
                    ],
                    unitPeople: [
                        verification.NotNull
                    ]
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function () {
                    var unitname = getDicValue('08', this.Form.LiftingUnit)
                    var unitPeoplename = getDicValue('09', this.Form.LiftingConfirmor)
                    parent.app.Form.LiftingOperator.push({
                        LiftingUnit: unitname,
                        LiftingConfirmor: unitPeoplename
                    });
                    parent.app.ListItem.dialogVisible = false;
                }
            },
            mounted: function () {
                this.unitDepartment = getDicData('08');
                this.PeopleList = getDicData('09');
           
            },
        });
    </script>
</body>
</html>